package com.ssy.lingxi.purchase.repository.tender;

import com.ssy.lingxi.purchase.entity.tender.Template;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 评标模板持久化层
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/3/22
 */
public interface TemplateRepository extends JpaRepository<Template,Long>, JpaSpecificationExecutor<Template> {
    List<Template> findByMemberIdAndMemberRoleIdAndNameAndIdNot(Long memberId, Long memberRoleId, String name, Long id);

    List<Template> findByMemberIdAndMemberRoleIdAndName(Long memberId, Long memberRoleId, String name);

    List<Template> findByMemberIdAndMemberRoleIdAndIdIn(Long memberId, Long memberRoleId, List<Long> templateIdList);
}
